class Creater {
    create(name){
        return new AAA(name)
    }
}

class AAA{
    constructor(name){
        this.name = name
    }
}


var creater = new Creater()

var dog = creater.create('cat')
console.log(dog)